package com.app.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("lm_apply")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ApplyModel {
    @TableId(type = IdType.AUTO)
    private Integer id;//
    private Integer type;//请假类型
    private String reason;//请假事由
    private String area;//前往地区
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp startTime;//开始时间
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp endTime;//结束时间
    private Timestamp createTime;
    private Timestamp updateTime;
    private Integer personId;
    @TableField(exist = false)
    private long days;//天数
    @TableField(exist = false)
    private String name;//姓名
    @TableField(exist = false)
    private String typeText;//类型
    private Integer cancellation;//1未销假 2 销假
    @TableField(exist = false)
    private String cancellationText;//类型
    private String remark;//1未销假 2 销假
    @TableField(exist = false)
    private Integer series;//类型
}
